@import './var.less';

.cf:after {
  content: '';
  display: block;
  height: 0;
  overflow: hidden;
  clear: both;
}

.fl {
  float: left;
}
.fr {
  float: right;
}
.pd-xs {
  padding: 0.5 * @baseSize;
}
.pd-s {
  padding: 1 * @baseSize;
}
.pd {
  padding: 1.6 * @baseSize;
}
.pd-l {
  padding: 2 * @baseSize;
}
.pd-xl {
  padding: 3 * @baseSize;
}
.pd-xxl {
  padding: 4 * @baseSize;
}

.pdt-s {
  padding-top: 0.5 * @baseSize;
}
.pdt {
  padding-top: 1 * @baseSize;
}
.pdt-l {
  padding-top: 2 * @baseSize;
}
.pdt-xl {
  padding-top: 3 * @baseSize;
}
.pdt-xxl {
  padding-top: 4 * @baseSize;
}

.pdb-0 {
  padding-bottom: 0 !important;
}
.pdt-0 {
  padding-top: 0 !important;
}
.pdb-s {
  padding-bottom: 0.8 * @baseSize;
}
.pdb {
  padding-bottom: 1 * @baseSize;
}
.pdb-l {
  padding-bottom: 2 * @baseSize;
}
.pdb-xl {
  padding-bottom: 3 * @baseSize;
}
.pdb-xxl {
  padding-bottom: 4.7 * @baseSize;
}

.pdv-s {
  padding-top: 0.8 * @baseSize;
  padding-bottom: 0.8 * @baseSize;
}

.pdv {
  padding-top: 1.6 * @baseSize;
  padding-bottom: 1.6 * @baseSize;
}
.pdv-l {
  padding-top: 1.6 * @baseSize;
  padding-bottom: 1.6 * @baseSize;
}
.pdv-xl {
  padding-top: 1.8 * @baseSize;
  padding-bottom: 1.8 * @baseSize;
}
.pdv-xxl {
  padding-top: 4 * @baseSize;
  padding-bottom: 4 * @baseSize;
}

.pdh-s {
  padding-left: 0.5 * @baseSize;
  padding-right: 0.5 * @baseSize;
}
.pdh {
  padding-left: 1.6 * @baseSize;
  padding-right: 1.6 * @baseSize;
}
.pdh-l {
  padding-left: 1.6 * @baseSize;
  padding-right: 1.6 * @baseSize;
}
.pdh-xl {
  padding-left: 3 * @baseSize;
  padding-right: 3 * @baseSize;
}
.pdh-xxl {
  padding-left: 4 * @baseSize;
  padding-right: 4 * @baseSize;
}

.pdl-s {
  padding-left: 0.8 * @baseSize;
}
.pdl {
  padding-left: 1 * @baseSize;
}
.pdl-m{
  padding-left: 1.4 * @baseSize;
}
.pdl-l {
  padding-left: 2 * @baseSize;
}
.pdl-xl {
  padding-left: 3 * @baseSize;
}
.pdl-xxl {
  padding-left: 4 * @baseSize;
}

.pdr-s {
  padding-right: 0.5 * @baseSize;
}
.pdr {
  padding-right: 1 * @baseSize;
}
.pdr-l {
  padding-right: 2 * @baseSize;
}
.pdr-xl {
  padding-right: 3 * @baseSize;
}
.pdr-xxl {
  padding-right: 4 * @baseSize;
}

.mgb-s {
  margin-bottom: 0.5 * @baseSize;
}
.mgb {
  margin-bottom: 1 * @baseSize;
}
.mgb-m {
  margin-bottom: 1.5 * @baseSize;
}
.mgb-l {
  margin-bottom: 2 * @baseSize;
}
.mgb-xl {
  margin-bottom: 3 * @baseSize;
}
.mgb-xxl {
  margin-bottom: 4 * @baseSize;
}
.mgl-5{
  margin-left: 5%;
}
.mgl {
  margin-left: 1 * @baseSize;
}
.mgl-m{
  margin-left: 1.4 * @baseSize;
}
.mgt-l {
  margin-top: 2 * @baseSize;
}
.mgt-xl {
  margin-top: 3 * @baseSize;
}

.mgtb-m{
  margin-top: 1.5 * @baseSize;
  margin-bottom: 1.5 * @baseSize;
}

.bg-white {
  background-color: @colorWhite;
}
.bg-gray {
  background-color: #f8f8f8;
}

.bd-t {
  border-top: 1px solid #eee;
  &-light {
    border-top: 1rpx solid #eee;
  }
}
.bd-b {
  border-bottom: 1px solid #eee;
  &-light {
    border-bottom: 1rpx solid #eee;
  }
}
.bd-r {
  border-right: 1px solid #eee;
}
.bd-l {
  border-left: 1px solid #eee;
  &.bw-2 {
    border-width: 2px !important;
  }
}
.bd-l-main {
  border-left: 4px solid @colorTeal;
  &.bw-2 {
    border-width: 2px !important;
  }
}
.bd-b {
  border-bottom: 1px solid @colorBorder;
  &.bw-2 {
    border-width: 2px !important;
  }
}
.bd-blue {
  border: 1px solid @colorBlue;
  &.bw-2 {
    border-width: 2px !important;
  }
}

.bdl {
  border-left: 1px solid @colorBorder;
  &.xl {
    border-width: 5px;
  }
  &.primary {
    border-color: @colorPrimary;
  }
}

.fs-xt {
  font-size: 0.9 * @baseSize;
}
.fs-t {
  font-size: 1 * @baseSize;
}
.fs-xxs {
  font-size: 1.2 * @baseSize;
}
.fs-xs {
  font-size: 1.3 * @baseSize;
}
.fs-s {
  font-size: 1.4 * @baseSize;
}
.fs {
  font-size: 1.5 * @baseSize;
}
.fs-l {
  font-size: 1.6 * @baseSize;
}
.fs-xl {
  font-size: 1.7 * @baseSize;
}
.fs-xxl {
  font-size: 1.8 * @baseSize;
}
.fs-h {
  font-size: 2 * @baseSize;
}
.fs-xh {
  font-size: 2.6 * @baseSize;
}

.fs-1 {
  font-size: @size-1 !important;
}
.fs-2 {
  font-size: @size-2 !important;
}
.fs-3 {
  font-size: @size-3 !important;
}
.fs-4 {
  font-size: @size-4 !important;
}
.fs-5 {
  font-size: @size-5 !important;
}
.fs-6 {
  font-size: @size-6 !important;
}

.fw-xxs {
  font-weight: 100;
}

.fw-xs {
  font-weight: 200;
}

.fw-s {
  font-weight: 300;
}

.fw {
  font-weight: bold;
}

.ta-c {
  text-align: center  !important;
}
.ta-r {
  text-align: right !important;
}
.ta-l {
  text-align: left !important;
}

.c-red {
  color: @colorRed !important;
}
.c-orange {
  color: @colorOrange;
}
.c-dark {
  color: @colorBlack;
}
.c-blue {
  color: @colorBlue;
}
.c-black {
  color: #333;
}

.c-gray {
  color: @colorGray !important;
}

.c-ccc{
  color:@colorCCC;
}

.c-gray-l {
  color: lighten(@colorGray, 20%);
}

.c-primary {
  color: @colorTeal !important;
}

.bs {
  box-shadow: 0 0 5px rgba(0,0,0,.3);
}

.fix-bottom {
  position: fixed;
  width: 100%;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-sizing: border-box;
  border-top: 1rpx solid #eee;
  background-color: white;
}

.fix-top {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 100;
  box-sizing: border-box;
}

.v-mdl {
  align-items: center;
  justify-content: center;
}

.br {
  border-radius: 0.5 * @baseSize;
}

.dis-inline {
  display: inline-block;
}

.ui.btn {
  // height: 98rpx;
  border: none;
  &:after {
    border: none;
  }
  height: 50px;
  line-height: 50px;
  &.s {
    height: 40px;
    line-height: 40px;
  }
  &.no-rounder {
    border-radius: 0 !important;
  }
  &.primary {
    color: white;
    border-radius: 4px;
    font-size: @size-3;
    background-color: @colorPrimary;
    &.is-outlined {
      background: none;
      border: 1px solid @colorPrimary;
      color: @colorPrimary;
      box-shadow: none;
    }
    &:active {
      background-color: darken(@colorPrimary, 5%);
    }
    &.disabled {
      background-color: @colorDisable;
    }
  }
  &.primary-fixed{
    color: white;
    border-radius:0;
    font-size: @size-3;
    line-height: 1;
    background-color: @colorPrimary;
  }
  &.secondary{
    background-color:@colorWhite;
    color: @colorPrimary;
    font-size: @size-3;
    border-top: 1rpx solid @colorDDD;
    box-sizing: border-box;
    border-radius: 0;
  }
  &.empty {
    height: auto;
    position:relative;
    display:block;
    margin-left:auto;
    margin-right:auto;
    padding-left:0;
    padding-right:0;
    box-sizing:border-box;
    font-size: @fs;
    text-align:center;
    text-decoration:none;
    line-height:1;
    border-radius:0;
    background-color: white;
    padding: 0;
    color: #333;
  }
  &.link {
    height: auto;
    line-height: auto;
    position:relative;
    display:block;
    margin-left:auto;
    margin-right:auto;
    padding-left:0;
    padding-right:0;
    box-sizing:border-box;
    font-size: @fs;
    text-align:center;
    line-height:1;
    border-radius:0;
    background-color: white;
    padding: 0;
    font-size: @size-3;
    color: @colorBlue;
    &:active {
      color: darken(@colorBlue, 10%);
    }
  }
  &.no-border {
    border: none !important;
  }
  &.disabled {
    opacity: .6;
  }
  &.fullwidth {
    width: 100% !important;
    display: block !important;
  }
  i {
    line-height: 1;
    font-size: 1.7 * @baseSize;
  }
}

.ui.btn-link {
  text-decoration: underline;
  color: @colorBlue;
  display: inline-block !important;
  &.default {
    color: @colorGray;
  }
  &.disabled {
    color: @colorLightGray !important;
  }
}

i.disabled {
  color: @colorLightGray;
}

.t-elp {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.is-v {
  visibility: hidden;
}

.dialog {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background-color: rgba(0,0,0,.6);
  z-index: 2000;
  &-inner {
    position: absolute;
    width: 70%;
    left: 50%;
    top: 50%;
    margin: 0 auto;
    background-color: @colorWhite;
    z-index: 0;
    border-radius: .5 * @baseSize;
    transform: translate(-50%,-50%);
    overflow: hidden;
  }
  &-hd {
    border-bottom: 1px solid @colorLightGray;
    padding: 1 * @baseSize;
    text-align: center;
    font-weight: bold;
    font-size: @fs-l;
  }
  &-bd {
  }
  &-ft {
    background-color: #eee;
    border-top: 1px solid @colorLightGray;
  }
}

.re{
  position: relative;
}
.ab{
  position: absolute;
}

.w100{
  width:100%;
}
.w80{
  width:80%;
}
.w85{
  width:85%;
}

.w30{
  width: 30%;
}

.color-primary{
  color: @colorPrimary;
}

.block-ellipsis{
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-msg{
  display: block;
  border-radius: 50%;
  width: 32rpx;
  height: 32rpx;
  background-color: @colorRed;
  font-size:18rpx;
  color: @colorWhite;
  text-align: center;
  line-height: 32rpx;
}
.tag-role{
  font-size:20rpx;
  padding:2rpx 12rpx;
  background-color: @colorSecondary;
  border-radius: @radius-s;
  color:@colorWhite;
}
.tag-student{
  background-color: @colorYellow;
}

.holder{
  color:@colorCCC;
}

.btn-half{
  width: 50%;
  box-sizing: border-box;
}
.line{
  width: 100%;
  height: 2rpx;
  background-color: @colorEEE;
}

.checkbox{
  padding-right: 16rpx;
  // padding: rpx;
  box-sizing: border-box;
  image{
    width: 32rpx;
    height: 32rpx;
  }
}

.modal {
  position: fixed;
  background-color: rgba(0,0,0,.6);
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 100;
  &-inner {
    position: absolute;
    background-color: white;
    border-radius: 5px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    overflow: hidden;
  }
  &-hd {
    text-align: center;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    position: relative;
  }
  &-desc {
    font-size: 14px;
    color: @colorGray;
    padding-top: 8px;
  }
  &-close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 5px;
    top: 5px;
    line-height: 30px;
    text-align: center;
    i {
      font-size: 12px;
      color: @colorGray;
    }
  }
}

.tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  color: white;
  background-color: #ccc;
  font-size: 10px;
  position: relative;
  top: -1px;
  &.info {
    background-color: @colorPrimary;
    &.is-outlined {
      background-color: white;
      border: 1px solid @colorPrimary;
      color: @colorPrimary;
    }
  }
  &.success {
    background-color: #7ED321;
  }
  &.danger {
    background-color: #FF5F6D;
  }
  &.info {
    background-color: #00CFCB;
  }
  &.warning {
    background-color: #FCCF22;
  }
}

.block-progress {
  background-color: #f8f8f8;
  padding: 3px;
  color: #999;
}

.spin {
  animation: spin 800ms infinite linear;
}
.shing {
  animation: shing 300ms infinite alternate;
}
.dolt {
  display: inline-block;
  background-color: @colorRed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  position: relative;
  top: -3px;
}
.psr {
  position: relative;
}
@keyframes spin {
  0%   { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}
@keyframes shing {
  0%   { opacity: .3 }
  100% { opacity: 1 }
}
